// ============================== 导入依赖 ============================== //

import CORE from '@/CORE'
import Client from '@api/maintain/api/PlanApi'

import AddClass from '@api/maintain/model/CreatePlanTaskReq'

const CLIENT = CORE.grpcCLIENT(Client)

// ============================== 导出远程接口 ============================== //

export default {
  // —————————————————————————————— 新增 —————————————————————————————— //

  async add(one, TIP = '新增') {
    const DTO = CORE.grpcDTO(AddClass, one)
    await CORE.grpc(TIP, CLIENT, 'createPlanTask', DTO)
    return CORE.grpcOK(TIP)
  },
}
